x86: hap dirty vram tracking
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 4 Jun 2009 21:25:10 +0000 (22:25 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 4 Jun 2009 21:25:10 +0000 (22:25 +0100)
commit183d02baf2fe56ad83784f0c9011d5dc7fee1502
tree9165062c3f3c525780d041c5d3346e86901b0fd7
parent57d9503643d99ef7a1b167038e39b4ab4bd477fd
x86: hap dirty vram tracking

Currently HAP systems suffer a significant performance loss when a vnc
client is connect or the sdl interface is used, because HAP is lacking
an implementation of track_dirty_vram.
As a consequence qemu always tries to update the whole screen because
it does not know which areas of the screen have been updated by the
guest.

This patch implements track_dirty_vram for HAP enabling the logdirty
mechanism only in a specific gfn range and adding a
paging_log_dirty_range function that returns the log dirty bitmap in a
requested range.

Paging_log_dirty_range is different from paging_log_dirty_op because
operates on a range and also because it does not pause the domain. In
order not to lose any update I moved clean_dirty_bitmap at the
beginning of the function before evaluating the logdirty bitmap.
The bitmap is still safe because it is protected by the logdirty lock.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/mm/hap/hap.c
xen/arch/x86/mm/paging.c
xen/arch/x86/mm/shadow/private.h
xen/include/asm-x86/hap.h
xen/include/asm-x86/paging.h